package org.example.myleet.p629;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(1 == solution.kInversePairs(1, 0));
        Assert.isTrue(0 == solution.kInversePairs(1, 1));
        Assert.isTrue(0 == solution.kInversePairs(2, 2));
        Assert.isTrue(1 == solution.kInversePairs(3, 0));
        Assert.isTrue(2 == solution.kInversePairs(3, 1));
        Assert.isTrue(2 == solution.kInversePairs(3, 2));
        Assert.isTrue(1 == solution.kInversePairs(3, 3));
        Assert.isTrue(22 == solution.kInversePairs(5, 5));
        Assert.isTrue(999 == solution.kInversePairs(1000, 1));
        Assert.isTrue(24087 == solution.kInversePairs(15, 99));
        Assert.isTrue(654919887 == solution.kInversePairs(100, 99));
        Assert.isTrue(663677020 == solution.kInversePairs(1000, 1000));
    }
}
